package FileTransferIRPConstDefs;


/**
 * Generated from IDL struct "FileInfo".
 *
 * @author JacORB IDL compiler V 2.3.0, 17-Feb-2007
 * @version generated at 2013-5-20 22:07:19
 */

public final class FileInfoHelper
{
	private static org.omg.CORBA.TypeCode _type = null;
	public static org.omg.CORBA.TypeCode type ()
	{
		if (_type == null)
		{
			_type = org.omg.CORBA.ORB.init().create_struct_tc(FileTransferIRPConstDefs.FileInfoHelper.id(),"FileInfo",new org.omg.CORBA.StructMember[]{new org.omg.CORBA.StructMember("file_location", FileTransferIRPConstDefs.FileLocationHelper.type(), null),new org.omg.CORBA.StructMember("file_size", FileTransferIRPConstDefs.FileSizeHelper.type(), null),new org.omg.CORBA.StructMember("file_ready_time", FileTransferIRPConstDefs.UTCTimeHelper.type(), null),new org.omg.CORBA.StructMember("file_expiration_time", FileTransferIRPConstDefs.UTCTimeHelper.type(), null),new org.omg.CORBA.StructMember("file_compression", FileTransferIRPConstDefs.FileCompressionHelper.type(), null),new org.omg.CORBA.StructMember("file_format", FileTransferIRPConstDefs.FileFormatHelper.type(), null)});
		}
		return _type;
	}

	public static void insert (final org.omg.CORBA.Any any, final FileTransferIRPConstDefs.FileInfo s)
	{
		any.type(type());
		write( any.create_output_stream(),s);
	}

	public static FileTransferIRPConstDefs.FileInfo extract (final org.omg.CORBA.Any any)
	{
		return read(any.create_input_stream());
	}

	public static String id()
	{
		return "IDL:FileTransferIRPConstDefs/FileInfo:1.0";
	}
	public static FileTransferIRPConstDefs.FileInfo read (final org.omg.CORBA.portable.InputStream in)
	{
		FileTransferIRPConstDefs.FileInfo result = new FileTransferIRPConstDefs.FileInfo();
		result.file_location=FileTransferIRPConstDefs.FileLocationHelper.read(in);
		result.file_size=in.read_ulong();
		result.file_ready_time=TimeBase.UtcTHelper.read(in);
		result.file_expiration_time=TimeBase.UtcTHelper.read(in);
		result.file_compression=in.read_string();
		result.file_format=in.read_string();
		return result;
	}
	public static void write (final org.omg.CORBA.portable.OutputStream out, final FileTransferIRPConstDefs.FileInfo s)
	{
		FileTransferIRPConstDefs.FileLocationHelper.write(out,s.file_location);
		out.write_ulong(s.file_size);
		TimeBase.UtcTHelper.write(out,s.file_ready_time);
		TimeBase.UtcTHelper.write(out,s.file_expiration_time);
		out.write_string(s.file_compression);
		out.write_string(s.file_format);
	}
}
